home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / tex / lametex_.z / lametex_ / lametex / src / Operator.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-08  |  2.5 KB  |  59 lines

  1. /* Operator.h
  2.  *
  3.  * Some tokens like the curly braces have many meanings in many places.
  4.  * However, for most tokens there is a simple one-to-one mapping between
  5.  * the token and some operation to be performed. There are a number of
  6.  * common types of operators, and then some special purpose ones.
  7.  *
  8.  * Copyright 1992 Jonathan Monsarrat. Permission given to freely distribute,
  9.  * edit and use as long as this copyright statement remains intact.
  10.  *
  11.  */
  12.  
  13. const MAXNAMES = 10;
  14. class Operator {
  15.    char *_tokentext;             // The text of the token for this Op-ator
  16.    char *_replacestr;            // A description of the change to be made.
  17.    float  _value;                // An alternate description of what to change
  18.    int  _paramtype;              // Which Parameter derived class to call
  19.    int  _subtype;                // Inside the Param class, what type is this?
  20.    void (*_handle)(int, int, float, char *); // The function to call for token
  21.    int _valid;
  22.    int _stealth;                 // Is this a LameTeX stealth command?
  23.    int _page_specific;           // Can this command be executed 
  24.                                  // before an StartPage?
  25.  
  26.  public:
  27.    static void addtolength(int, int, float, char *);
  28.    static void clearpage(int, int, float, char *);
  29.    static void document(int, int, float, char *);
  30.    static void do_vspace(int, int, float, char *);
  31.    static void hspace(int, int, float, char *);
  32.    static void include_file(int, int, float, char *);
  33.    static void includeps(int, int, float, char *);
  34.    static void label(int, int, float, char *);
  35.    static void new_paragraph(int, int, float, char *);
  36.    static void newlength(int, int, float, char *);
  37.    static void postscript(int, int, float, char *);
  38.    static void pscmd(int, int, float, char *);
  39.    static void pspage(int, int, float, char *);
  40.    static void ref(int, int, float, char *);
  41.    static void replace(int, int, float, char *);
  42.    static void setlength(int, int, float, char *);
  43.    static void skip(int, int, float, char *);
  44.    static void stealth(int, int, float, char *);
  45.    static void today(int, int, float, char *);
  46.    static void vspace(int, int, float, char *);
  47.    Operator(const int);
  48.    Operator(char*, int, int, int, int, float, char*,
  49.             void (*f)(int, int, float, char *));
  50.    static void registrar(char *, char *);
  51.    static void plaintext(char *);
  52.    static Operator* get_operator(char *);
  53.    static int compare(const void *, const void *);
  54.    int match(char *);
  55.    void execute();
  56.    int isvalid();
  57.    int is_stealth();
  58. };
  59.